package com.example.zhongshuishi.service.implService;

import com.example.zhongshuishi.entity.Tax;
import com.example.zhongshuishi.entity.TaxExample;
import com.example.zhongshuishi.mapper.TaxMapper;
import com.example.zhongshuishi.service.TaxService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TaxServiceImpl implements TaxService {
    @Autowired
    private TaxMapper taxMapper;

    @Override
    public int insertSelective(Tax record) {
        return taxMapper.insertSelective(record);
    }

    @Override
    public List<Tax> selectList(Tax record) {
        TaxExample taxExample = new TaxExample();
        taxExample.createCriteria().andStuIdEqualTo(record.getStuId()).andKplxEqualTo(record.getKplx());
        List<Tax> taxes = taxMapper.selectByExample(taxExample);
        return taxes;
    }

    @Override
    public int updateByPrimaryKeySelective(Tax record) {
        return taxMapper.updateByPrimaryKeySelective(record);
    }
}